﻿using Microsoft.Xna.Framework;

namespace PoolGame2.Physics
{
    public class PhysicsObject
    {
        protected Vector3 position;
        public Vector3 velocity = Vector3.Zero;
        protected Vector3 acceleration = Vector3.Zero;
        public bool moveable = true;

        private bool visible = true;

        public PhysicsObject()
        {
        }

        public Vector3 getPosition()
        {
            return position;
        }

        public void setPosition(Vector3 newPos)
        {
            this.position = newPos;
        }

        public void setVelocity(Vector3 v)
        {
            this.velocity = v;
        }

        public void setVisible(bool v)
        {
            visible = v;
        }

        public bool getVisible()
        {
            return visible;
        }

        public Vector3 getRotation()
        {
            return Vector3.Zero;
        }

        public Vector3 getVelocity()
        {
            return velocity;
        }

        public virtual void Integrate(float time, bool forTracking)
        {
                Vector3 mul = Vector3.Multiply(velocity, time);
                position = Vector3.Add(position, mul);
        }

    }
}
